<html>
 <head>
  <title>Readmission Risk</title>
 </head>
 <body>

<!--change action if we are using a different page for displaying the patient history table-->
<form action="add_patient.php" method="post">
   Patient Name: <input type="text" size="20" name="p_name"><br>
   Patient Age: <input type="text" size="20" name="p_age"><br>
   Patient Zipcode: <input type="text" size="20" name="p_zip"><br>

<input type="submit" value="Add Patient">
<input type="reset" value="Clear">
</form>

<p>

<?php
mysql_connect('129.74.153.54', 'HA_User', 'hag') or die (mysql_error());
$mysql_select_db('HA_database') or die (mysql_error());
$result = mysql_query("SELECT * from example");

//Table starting tag and header cells
echo "<table border='1'><tr><th>Name</th><th>Age</th><th>Zip Code</th></tr>";

while($row = mysql_fetch_array($result)){
	//Display the results in different cells
	echo "<tr><td>" . $row['name'] . "</td><td>" . $row['age'] . "</td><td>" . $row['zipcode'] . "</td></tr>";
}

//Table closing tag
echo "</table>";

?>

</p>

</body>
</html>

